﻿using Agile.Infra.Pay.WxPay;

namespace Agile.Service.Admin.WebApi.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [AllowAnonymous]
    public class TestController : AgileControllerBase
    {
        /// <summary>   </summary> 
        [HttpPost]
        public async Task Test()
        {
            await this.GetService<IWxPayService>().JSAPIPayAsync(new Infra.Pay.WxPay.Models.WxJSAPIPayRequest
            {
                TotalAmount = 100, 
                TimeExpire = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ"),
                OutTradeNo = "1217752501201407033233368018",
                Description = "Image形象店-深圳腾大-QQ公仔",
                ProfitSharing = true,
                NotifyUrl = "https://www.weixin.qq.com/wxpay/pay.php",
                SupportFapiao = false,
                GoodsTag = "",
                OpenID = "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o"
            });
        }
    }
}
